#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtGui>
#include "abstractview.h"
#include "imagewidget.h"
#include "maincontroller.h"

QT_BEGIN_NAMESPACE
    class QAction;
    class QFrame;
    class QWidget;
QT_END_NAMESPACE

using namespace controllers;

namespace Ui {
    class MainWindow;
}

namespace views {

    enum ViewTypes { RECOGNITION_VIEW, INFORMATION_VIEW, CONFIGURATION_VIEW, CONTROL_VIEW };

    class MainWindow : public QMainWindow
    {
        Q_OBJECT

    public:
        explicit MainWindow(QWidget *parent = 0);
        ~MainWindow();
        void            initUI();
        void            setupUI();
        void            setView(AbstractView *v, ViewTypes type);
        AbstractView*   getView(ViewTypes type);
        void            showView(ViewTypes type);
        void            showViews();
        void            setupListeners();
        void            setMainController(MainController* mc);

    private slots:
        void showConfigurationView();
        void showInformationView();
        void showRecognitionView();
        void showControlsView();
        void startVision();
        void stopVision();

    private:
        Ui::MainWindow  *_ui;
        QFrame          *_headerHBox;
        QFrame          *_viewVBox;
        QVBoxLayout     *_viewVLayout;
        QWidget         *_centralWidget;
        AbstractView    *_configurationView;
        AbstractView    *_informationView;
        AbstractView    *_recognitionView;
        AbstractView    *_controlView;
        QAction         *_actionShowConfig;
        QAction         *_actionShowInfo;
        QAction         *_actionShowRecog;
        QAction         *_actionShowControls;
        MainController  *_mainController;

    };
}
#endif // MAINWINDOW_H
